﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Framework.Event;
using Framework.Sample.Domain.Event;
using Framework.Infrastructure;

namespace Framework.Sample.DomainEventHandler
{
    public class AccountEventSubscriber :  IEventSubscriber
    {
        [EventHandler(IsAsync = true)]
        public void Handle(AccountRegistered message)
        {
            Console.Write(message.ToJson());
        }


        [EventHandler(IsAsync = false)]
        public void Handle(PasswordChanged message)
        {
            Console.Write(message.ToJson());
        }
    }
}
